﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Serialization;

namespace DevelopStudio.Basic
{
    [Serializable]
    [XmlRoot("Root")]
    public class EnvironmentSettings
    {
        public EnvironmentSettings()
        {
            Init();
        }

        private void Init()
        {
            Version = new Version();
            View = new ViewInfo();
            MyInfo = new MemberInfo();
            Redmine = new RedmineInfo();
            WorkingCopies = new List<WorkingCopyInfo>();
        }

        [XmlElement("Version")]
        public Version Version { get; set; }

        [XmlElement("ViewInfo")]
        public ViewInfo View { get; set; }

        [XmlElement("MyInfo")]
        public MemberInfo MyInfo { get; set; }

        [XmlElement("Redmine")]
        public RedmineInfo Redmine { get; set; }

        [XmlArray("WorkingCopies")]
        [XmlArrayItem("WorkingCopy", typeof(WorkingCopyInfo))]
        public List<WorkingCopyInfo> WorkingCopies { get; set; }
    }
}
